package com.demo.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import com.demo.model.User;

public class XmlConfController extends AbstractController {

	Logger logger = Logger.getLogger(getClass());

	static void printHalvingLine() {
		System.out.println("------------------------------");
		System.out.println("------------------------------");
	}

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		printHalvingLine();
		ModelAndView mav = new ModelAndView("hello");
		User user = new User();
		user.setName("userName");
		mav.addObject("user", user);
		printHalvingLine();
		return mav;
	}
}
